public class Hanoi {
    public static void move(int n,char a,char b,char c){
        if(n==1){
            System.out.println("将编号为"+n+"从"+a+"移到"+c);
        }
        else{
            move(n-1,a,c,b);
            System.out.println("将编号为"+n+"从"+a+"移到"+c);
            move(n-1,b,a,c);
        }
    }
}


